package com.cms.common.model.repository;

import com.cms.common.model.entity.AdminUser;
import com.cms.common.model.entity.Roles;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface AdminUserRepository extends JpaSpecificationExecutor<AdminUser>, JpaRepository<AdminUser, Long>, PagingAndSortingRepository<AdminUser, Long> {
    AdminUser findByUsername(String username);

    AdminUser findByUuid(String uuid);

    List<AdminUser> findByRoles(Roles roles);

}